<%@ page contentType="text/html; charset=UTF-8" language="java"%>
<%@include file="/WEB-INF/jsp/include/header.jsp"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
	<title>仓储管理系统</title>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery-1.7.1.min.js"></script>
		<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/js/easyui-1.2.5/themes/default/easyui.css">
		<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/js/easyui-1.2.5/themes/icon.css">
		<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/table.css">
		<script type="text/javascript" src="${pageContext.request.contextPath}/js/easyui-1.2.5/jquery.easyui.min.js"></script>
		<script type="text/javascript" src="${pageContext.request.contextPath}/js/easyui-1.2.5/locale/easyui-lang-zh_CN.js"></script>
		<script type="text/javascript" src="${pageContext.request.contextPath}/js/easyui-1.2.5/plugins/jquery.validatebox.js"></script>
		<script type="text/javascript" src="${pageContext.request.contextPath}/js/easyui-1.2.5/validatebox.js"></script>
		<script type="text/javascript" src="${pageContext.request.contextPath}/js/globalMaps.js"></script>
		<script type="text/javascript">
			<c:forEach items="${globalUmUser.mdafs}" var="mdaf" varStatus="s">
				globalMaps.put('${mdaf}', '${mdaf}');
			</c:forEach>
		</script>
		<script type="text/javascript" src="${pageContext.request.contextPath}/js/cms/cmsmj.js"></script>
	</head>
	<body>
		<!-- 表格 -->
		<table id="cmsmjTable" title="单据类别管理" border="0" cellspacing="0" cellpadding="0" iconCls="icon-tip" width="98%" pagination="true" remoteSort="false" singleSelect="false" idField="mjaa" showFooter="false" striped="true" url="<c:url value='/cmsmj/cmsmjList.xhtml'/>">
			<thead>
				<tr align="center">
					<th field="mjaa" width="80">编号</th>
					<th field="mjab" width="100">名称</th>
					<th field="mjac" formatter='mjacFormatter' width="100">性质</th>
					<th field="mjad" formatter='mjadFormatter' width="100">审核模式</th>
					<th field="mjae" formatter='mjaeFormatter' width="100">状态</th>
				</tr>
			</thead>
		</table>
		<div id="cmsmjSearch" class="easyui-window" title="查询" style="padding:5px;width:250px;height:250;" iconCls="icon-search" closed="true" maximizable="false" minimizable="false" collapsible="true">
			<form method="post" name="searchForm" id="searchForm">
				<div class="ToolTip_Form" id="cmsmjSearchForm" onkeydown="if(event.keyCode==13){searchCmsmj();}">
					<table>
						<tr>
							<td align="right">编号:</td>
							<td align="left"><input type="text" id="searchMjaa" name="mjaa" class="easyui-validatebox"></td>
						</tr>
						<tr>
							<td align="right">名称:</td>
							<td align="left"><input type="text" id="searchMjab" name="mjab" class="easyui-validatebox"></td>
						</tr>
						<tr>
							<td align="right">性质:</td>
							<td align="left">
								<select id="searchMjac" name="mjac" style="width:150px;" class="easyui-combobox">
									<option value="0">请选择</option>
									<option value="1">采购订单</option>
									<option value="2">采购收货单</option>
									<option value="3">采购退货单</option>
									<option value="4">采退发货单</option>
									<option value="5">物料转移单</option>
									<option value="6">日记账</option>
									<option value="7">生产入库单</option>
									<option value="8">销售订单</option>
									<option value="9">销售发货单</option>
									<option value="10">销售退货单</option>
									<option value="11">销退收货单</option>
									<option value="12">盘点单</option>
									<option value="13">工单</option>
								</select>
							</td>
						</tr>
						<tr>
							<td align="right">状态:</td>
							<td align="left">
								<select id="searchMjad" name="mjad" style="width:150px;" class="easyui-combobox">
									<option value="0">请选择</option>
									<option value="1">正常</option>
									<option value="2">禁用</option>
								</select>
							</td>
						</tr>
						<tr align="center">
							<td colspan="2"><a class="easyui-linkbutton" iconCls="icon-search" href="javascript:void(0);" onclick="searchCmsmj()">查询</a></td>
						</tr>
					</table>
				</div>
			</form>
		</div>
		<!-- 添加 -->
		<div id="cmsmjAdd" icon="icon-save" style="padding:5px;width:300px;height:220px;">
			<form method="post" name="addForm" id="addForm">
				<div class="ToolTip_Form" id="cmsmjAddForm" onkeydown="if(event.keyCode==13){cmsmjAdd();}">
					<table>
						<tr>
							<td align="right">编号：</td>
							<td align="left"><input type="text" class="easyui-validatebox" id="cmsmjAddMjaa" name="mjaa" maxlength="20" required="true" validType="sieralNumber" missingMessage="编号不能为空!"/></td>
						</tr>
						<tr>
							<td align="right">名称：</td>
							<td align="left"><input type="text" class="easyui-validatebox" id="cmsmjAddMjab" name="mjab" maxlength="20" required="true" validType="length[1,20]" missingMessage="名称不能为空!" invalidMessage="名称不能超过20个字!"/></td>
						</tr>
						<tr>
							<td align="right">性质：</td>
							<td align="left">
								<select id="cmsmjAddMjac" name="mjac" style="width:150px;" class="easyui-combobox" required="true" missingMessage="请选择性质!">
									<option value="">请选择</option>
									<option value="1">采购订单</option>
									<option value="2">采购收货单</option>
									<option value="3">采购退货单</option>
									<option value="4">采退发货单</option>
									<option value="5">物料转移单</option>
									<option value="6">日记账</option>
									<option value="7">生产入库单</option>
									<option value="8">销售订单</option>
									<option value="9">销售发货单</option>
									<option value="10">销售退货单</option>
									<option value="11">销退收货单</option>
									<option value="12">盘点单</option>
									<option value="13">工单</option>
								</select>
							</td>
						</tr>
						<tr>
							<td align="right">审核模式：</td>
							<td align="left"><input type="radio" id="cmsmjAddMjad1" name="mjad" value="N" checked="checked"/>手动审核<input type="radio" id="cmsmjAddMjad2" name="mjad" value="Y" checked="checked"/>自动审核</td>
						</tr>
						<tr>
							<td align="center" colspan="2">
								<a href="#" class="easyui-linkbutton" icon="icon-ok" onclick="cmsmjAdd();">提交</a>&nbsp;&nbsp;&nbsp;
								<a href="#" class="easyui-linkbutton" icon="icon-redo" onclick="cmsmjAddReset();">重置</a>
							</td>
						</tr>
					</table>
				</div>
			</form>
		</div>
		<!-- 编辑 -->
		<div id="cmsmjUpdate" icon="icon-edit" style="padding:5px;width:300px;height:220px;">
			<form method="post" name="updateForm" id="updateForm">
				<div class="ToolTip_Form" id="cmsmjUpdateForm" onkeydown="if(event.keyCode==13){cmsmjUpdate();}">
					<input type="hidden" id="cmsmjInfoUpdateMjaa" name="mjaa"/>
					<table>
						<tr>
							<td align="right">编号：</td>
							<td align="left"><span id="cmsmjUpdateMjaa"></span></td>
						</tr>
						<tr>
							<td align="right">名称：</td>
							<td align="left"><input type="text" class="easyui-validatebox" id="cmsmjUpdateMjab" name="mjab" maxlength="20" required="true" validType="length[1,20]" missingMessage="名称不能为空!" invalidMessage="名称不能超过20个字!"/></td>
						</tr>
						<tr>
							<td align="right">性质：</td>
							<td align="left">
								<select id="cmsmjUpdateMjac" name="mjac" style="width:150px;" class="easyui-combobox" required="true" missingMessage="请选择性质!">
									<option value="">请选择</option>
									<option value="1">采购订单</option>
									<option value="2">采购收货单</option>
									<option value="3">采购退货单</option>
									<option value="4">采退发货单</option>
									<option value="5">物料转移单</option>
									<option value="6">日记账</option>
									<option value="7">生产入库单</option>
									<option value="8">销售订单</option>
									<option value="9">销售发货单</option>
									<option value="10">销售退货单</option>
									<option value="11">销退收货单</option>
									<option value="12">盘点单</option>
									<option value="13">工单</option>
								</select>
							</td>
						</tr>
						<tr>
							<td align="right">是否自动审核：</td>
							<td align="left"><input type="radio" id="cmsmjUpdateMjad1" name="mjad" value="N" checked="checked"/>手动审核<input type="radio" id="cmsmjUpdateMjad2" name="mjad" value="Y" checked="checked"/>自动审核</td>
						</tr>
						<tr>
							<td align="right">状态：</td>
							<td align="left"><span id="cmsmjUpdateMjad"></span></td>
						</tr>
						<tr>
							<td align="center" colspan="2">
								<a href="#" class="easyui-linkbutton" icon="icon-ok" onclick="cmsmjUpdate();">提交</a>&nbsp;&nbsp;&nbsp;
								<a href="#" class="easyui-linkbutton" icon="icon-redo" onclick="cmsmjUpdateReset(items[0],items[1],items[2],items[3],items[4]);">重置</a>
							</td>
						</tr>
					</table>
				</div>
			</form>
		</div>
	</body>
</html>